/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.risk.imei.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 设备绑定imei码
 *
 * @author pig
 * @date 2023-08-18 11:06:49
 */
@Data
@TableName("risk_equipment_imei")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "设备绑定imei码")
public class EquipmentImeiEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	 * 标识
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@Schema(description="标识")
	private Long id;

	/**
	* 设备 id 。由 uni-app 框架生成并存储，清空 Storage 会导致改变
	*/
    @Schema(description="设备 id 。由 uni-app 框架生成并存储，清空 Storage 会导致改变")
	@NotNull(message = "设备 id获取失败")
    private String deviceId;

	/**
	* imei唯一码
	*/
    @Schema(description="imei唯一码")
	@NotBlank(message = "imei码不能为空")
    private String imei;

	/**
	* 设备品牌
	*/
    @Schema(description="设备品牌")
    private String deviceBrand;

	/**
	* 设备型号
	*/
    @Schema(description="设备型号")
    private String deviceModel;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;


	public String getOrgIdStr(){
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company,this.orgId);

	}

}
